import React from 'react'

import './style'
import ContainerModle from '../../common/containerModle'
import ContainerViewExtend from './containerViewExtend'
import ContainerViewProxy from './containerViewProxy'
import SettingProxy from './settingProxy'

export default class CustomPage extends React.Component{

    static defaultProps = {
        javaInterface:{
            find: '/api/portalTsLogin/element/getImgData',
            save: '/api/portalTs/img/save',
            update: '/api/portalTs/img/update',
            saveOrUpdateItem: '/api/portalTs/img/saveOrUpdateItem',
            deleteItem: '/api/portalTs/img/deleteItem',
            orderItem: '/api/portalTs/img/orderItem',
        }
    }

    onSaveBeforeHandler = (setting={})=>{
        setting.title =  '图片元素'
        setting.isEjectImg = '0'
        setting.width = 75
        setting.widthType= '1'
        setting.height= 75
        setting.heightType= '1'
        setting.isAutoWidth= '0'
        setting.isAutoHeight= '0'
        setting.showWay= '2'
        setting.layoutType = '1'
        setting.sliderType = '5'
        setting.isHasSliderArrow = '1'
        setting.sliderSpeed = 2000
        setting.isShowTitle = '1'
        setting.titleFontSize = 16

    }

    onLoadAfterHandler = (data)=>{

    }

    render(){

        return (
            <ContainerModle ecId={`${this && this.props && this.props.ecId || ''}_ContainerModle@qm6jpf`} {...this.props} {...(this.props.location ? this.props.location.query :{})} ContainerViewProxy={ContainerViewProxy} SettingProxy={SettingProxy} onSaveBeforeHandler={this.onSaveBeforeHandler} onLoadAfterHandler={this.onLoadAfterHandler} ContainerViewExtend={ContainerViewExtend}>
            </ContainerModle>
        )
    }
}